package manager

import (
	"gitee.com/YunFeiGuoJi/golearning/pkg/connector"
	log "github.com/sirupsen/logrus"
	apiv1 "gitee.com/YunFeiGuoJi/golearning/api/v1"
	"gitee.com/YunFeiGuoJi/golearning/pkg/util/runner"
)

// Manager defines all the parameters needed for the installation.
type Manager struct {
	ObjName            string
	Logger             log.FieldLogger
	Cluster            *apiv1.ClusterSpec
	EtcdContainer      bool
	Connector          connector.Connector
	ClusterHosts       []string
	WorkDir            string
	KsEnable           bool
	KsVersion          string
	Debug              bool
	SkipCheck          bool
	SkipPullImages     bool
	SourcesDir         string
	CurrentDir         string
	Runner             *runner.Runner
	AddImagesRepo      bool
	InCluster          bool
	DeployLocalStorage bool
	Kubeconfig         string
	DownloadCommand    func(path, url string) string
	AllNodes           []apiv1.HostCfg
}

// Copy is used to create a copy for Manager.
func (mgr *Manager) Copy() *Manager {
	newManager := *mgr
	return &newManager
}